package com.example.chenjun.myapplication.mvp.presenter;

import com.example.chenjun.myapplication.mvp.contract.LabelDetailContract;
import com.example.chenjun.myapplication.net.netcallback.BaseCallback;
import com.example.chenjun.myapplication.util.Logger;

import org.json.JSONObject;

public class LabelDetailPresenter extends LabelDetailContract.AbstractLabelDetailPresenter {
    @Override
    public void getLabelDetail(String labelId, int index, int size) {
        getModel().getCookLabelDetail(labelId, index, size, new BaseCallback() {
            @Override
            protected Object parse(JSONObject json) {
                return json.toString();
            }

            @Override
            public void onResponse(Object o) {
                Logger.i(o.toString());
            }

            @Override
            public void onError(Exception e) {

            }
        });
    }
}
